<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>

</body>
<script type="text/javascript">
// 为抵抗洪水，战士连续作战89小时，编程计算共多少天零多少小时？
var hours = 89; // 总小时数;

var res1 = hours / 24;
res1 = parseInt(res1);

var res2 = hours % 24;

document.write("共用" + res1 + "天" + res2 + "小时。");

</script>
</html>